package hk.gov.ehr;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.web.context.request.RequestContextListener;

@SpringBootApplication
public class EhrLibrayProgramApp extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication.run(EhrLibrayProgramApp.class, args);
	}
	
	
	@Override  
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {  
        return application.sources(EhrLibrayProgramApp.class);  
    }  
	
	@Bean
    public RequestContextListener requestContextListener(){
        return new RequestContextListener();
    }
}
